#!/usr/bin/env python
# -*- coding: utf-8 -*-
#Intesim Python Script
Window.initCadWindow()
gl.Parameter('THICK', 8)
CAD.addParameter('THICK')
CAD.recomputeby('THICK')
gl.Parameter('HE', 23)
CAD.addParameter('HE')
CAD.recomputeby('HE')
gl.Parameter('DIST', -6)
CAD.addParameter('DIST')
CAD.recomputeby('DIST')

a1=%HE%+%THICK%

sketch = CAD.addSketch('sketch')
sketch.setRotation(0, 0, 0, 1)
CAD.getSketch('sketch').addPoint(CAD.Point(32, -31))
CAD.getSketch('sketch').addPoint(CAD.Point(3, -31))
CAD.getSketch('sketch').addPoint(CAD.Point(3, -20.5))
CAD.getSketch('sketch').addPoint(CAD.Point(5, -20.5))
CAD.getSketch('sketch').addPoint(CAD.Point(14.5, -11))
CAD.getSketch('sketch').addPoint(CAD.Point(14.5, -24))
CAD.getSketch('sketch').addPoint(CAD.Point(32, -24))
CAD.getSketch('sketch').addPoint(CAD.Point(32-%THICK%/2, -24))
CAD.getSketch('sketch').addPoint(CAD.Point(32-%THICK%/2, 23))
CAD.getSketch('sketch').addPoint(CAD.Point(15, 23))
CAD.getSketch('sketch').addPoint(CAD.Point(15, a1))
CAD.getSketch('sketch').addPoint(CAD.Point(32, a1))
CAD.getSketch('sketch').addPoint(CAD.Point(32, 23))
Model.updateSolverList()
Model.updateSolverList()
CAD.recompute()
CAD.getObject('sketch').label = 'fix'
sketch = CAD.addSketch('sketch001')
sketch.setRotation(0, 0, 0, 1)
CAD.getSketch('sketch001').addPoint(CAD.Point(17, -23))
CAD.getSketch('sketch001').addPoint(CAD.Point(25, -23))
CAD.getSketch('sketch001').addPoint(CAD.Point(25, 22))
CAD.getSketch('sketch001').addPoint(CAD.Point(17, 22))
Model.updateSolverList()
Model.updateSolverList()
CAD.getObject('sketch001').label = 'coil'
sketch = CAD.addSketch('sketch002')
sketch.setRotation(0, 0, 0, 1)
CAD.getSketch('sketch002').addPoint(CAD.Point(14.5, 46.5+%DIST%))
CAD.getSketch('sketch002').addPoint(CAD.Point(14.5, -4+%DIST%))
CAD.getSketch('sketch002').addPoint(CAD.Point(5, -13.5+%DIST%))
CAD.getSketch('sketch002').addPoint(CAD.Point(3, -13.5+%DIST%))
CAD.getSketch('sketch002').addPoint(CAD.Point(3, 26+%DIST%))
CAD.getSketch('sketch002').addPoint(CAD.Point(8, 31.5+%DIST%))
CAD.getSketch('sketch002').addPoint(CAD.Point(8, 46.5+%DIST%))
Model.updateSolverList()
Model.updateSolverList()
CAD.getObject('sketch002').label = 'armature'
sketch = CAD.addSketch('sketch003')
sketch.setRotation(0, 0, 0, 1)
CAD.getSketch('sketch003').addPoint(CAD.Point(3, -13.5+%DIST%))
CAD.getSketch('sketch003').addPoint(CAD.Point(3, 26+%DIST%))
CAD.getSketch('sketch003').addPoint(CAD.Point(8, 31.5+%DIST%))
CAD.getSketch('sketch003').addPoint(CAD.Point(8, 46.5+%DIST%))
CAD.getSketch('sketch003').addPoint(CAD.Point(0, 46.5+%DIST%))
CAD.getSketch('sketch003').addPoint(CAD.Point(0, -20.5+%DIST%))
CAD.getSketch('sketch003').addPoint(CAD.Point(14.5, 46.5+%DIST%))
CAD.getSketch('sketch003').addPoint(CAD.Point(14.5, -4+%DIST%))
CAD.getSketch('sketch003').addPoint(CAD.Point(14.5, -11+%DIST%))
CAD.getSketch('sketch003').addPoint(CAD.Point(5, -20.5+%DIST%))
CAD.getSketch('sketch003').addPoint(CAD.Point(3, -20.5+%DIST%))
Model.updateSolverList()
Model.updateSolverList()
CAD.getObject('sketch003').label = 'air'
CAD.getSketch('sketch').addLine(start = CAD.Point(3, -31), end = CAD.Point(3, -20.5), construction = False)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line1', pos_1=PointPos.Start, geo_2='vertex2', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line1', pos_1=PointPos.End, geo_2='vertex3', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Vertical, geo_1='line1')
CAD.getSketch('sketch').addLine(start = CAD.Point(3, -20.5), end = CAD.Point(5, -20.5), construction = False)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line2', pos_1=PointPos.Start, geo_2='vertex3', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line2', pos_1=PointPos.End, geo_2='vertex4', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Horizontal, geo_1='line2')
CAD.getSketch('sketch').addLine(start = CAD.Point(5, -20.5), end = CAD.Point(14.5, -11), construction = False)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line3', pos_1=PointPos.Start, geo_2='vertex4', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line3', pos_1=PointPos.End, geo_2='vertex5', pos_2=PointPos.Start)
CAD.getSketch('sketch').addLine(start = CAD.Point(14.5, -11), end = CAD.Point(14.5, -24), construction = False)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line4', pos_1=PointPos.Start, geo_2='vertex5', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line4', pos_1=PointPos.End, geo_2='vertex6', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Vertical, geo_1='line4')
CAD.getSketch('sketch').addLine(start = CAD.Point(14.5, -24), end = CAD.Point(32-%THICK%/2, -24), construction = False)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line5', pos_1=PointPos.Start, geo_2='vertex6', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line5', pos_1=PointPos.End, geo_2='vertex8', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Horizontal, geo_1='line5')
CAD.getSketch('sketch').addLine(start = CAD.Point(32-%THICK%/2, -24), end = CAD.Point(32-%THICK%/2, 23), construction = False)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line6', pos_1=PointPos.Start, geo_2='vertex8', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line6', pos_1=PointPos.End, geo_2='vertex9', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Vertical, geo_1='line6')
CAD.getSketch('sketch').addLine(start = CAD.Point(32-%THICK%/2, 23), end = CAD.Point(15, 23), construction = False)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line7', pos_1=PointPos.Start, geo_2='vertex9', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line7', pos_1=PointPos.End, geo_2='vertex10', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Horizontal, geo_1='line7')
CAD.getSketch('sketch').addLine(start = CAD.Point(15, 23), end = CAD.Point(15, a1), construction = False)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line8', pos_1=PointPos.Start, geo_2='vertex10', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line8', pos_1=PointPos.End, geo_2='vertex11', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Vertical, geo_1='line8')
CAD.getSketch('sketch').addLine(start = CAD.Point(15, a1), end = CAD.Point(32, a1), construction = False)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line9', pos_1=PointPos.Start, geo_2='vertex11', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line9', pos_1=PointPos.End, geo_2='vertex12', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Horizontal, geo_1='line9')
CAD.getSketch('sketch').addLine(start = CAD.Point(32, a1), end = CAD.Point(32, -31), construction = False)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line10', pos_1=PointPos.Start, geo_2='vertex12', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line10', pos_1=PointPos.End, geo_2='vertex1', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Vertical, geo_1='line10')
CAD.getSketch('sketch').addLine(start = CAD.Point(32, -31), end = CAD.Point(3, -31), construction = False)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line11', pos_1=PointPos.Start, geo_2='vertex1', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Coincident, geo_1='line11', pos_1=PointPos.End, geo_2='vertex2', pos_2=PointPos.Start)
CAD.getSketch('sketch').addConstraint(type=ConstraintType.Horizontal, geo_1='line11')
CAD.recompute()
CAD.getSketch('sketch001').addLine(start = CAD.Point(17, -23), end = CAD.Point(25, -23), construction = False)
CAD.getSketch('sketch001').addConstraint(type=ConstraintType.Coincident, geo_1='line1', pos_1=PointPos.Start, geo_2='vertex1', pos_2=PointPos.Start)
CAD.getSketch('sketch001').addConstraint(type=ConstraintType.Coincident, geo_1='line1', pos_1=PointPos.End, geo_2='vertex2', pos_2=PointPos.Start)
CAD.getSketch('sketch001').addConstraint(type=ConstraintType.Horizontal, geo_1='line1')
CAD.getSketch('sketch001').addLine(start = CAD.Point(25, -23), end = CAD.Point(25, 22), construction = False)
CAD.getSketch('sketch001').addConstraint(type=ConstraintType.Coincident, geo_1='line2', pos_1=PointPos.Start, geo_2='vertex2', pos_2=PointPos.Start)
CAD.getSketch('sketch001').addConstraint(type=ConstraintType.Coincident, geo_1='line2', pos_1=PointPos.End, geo_2='vertex3', pos_2=PointPos.Start)
CAD.getSketch('sketch001').addConstraint(type=ConstraintType.Vertical, geo_1='line2')
CAD.getSketch('sketch001').addLine(start = CAD.Point(25, 22), end = CAD.Point(17, 22), construction = False)
CAD.getSketch('sketch001').addConstraint(type=ConstraintType.Coincident, geo_1='line3', pos_1=PointPos.Start, geo_2='vertex3', pos_2=PointPos.Start)
CAD.getSketch('sketch001').addConstraint(type=ConstraintType.Coincident, geo_1='line3', pos_1=PointPos.End, geo_2='vertex4', pos_2=PointPos.Start)
CAD.getSketch('sketch001').addConstraint(type=ConstraintType.Horizontal, geo_1='line3')
CAD.getSketch('sketch001').addLine(start = CAD.Point(17, 22), end = CAD.Point(17, -23), construction = False)
CAD.getSketch('sketch001').addConstraint(type=ConstraintType.Coincident, geo_1='line4', pos_1=PointPos.Start, geo_2='vertex4', pos_2=PointPos.Start)
CAD.getSketch('sketch001').addConstraint(type=ConstraintType.Coincident, geo_1='line4', pos_1=PointPos.End, geo_2='vertex1', pos_2=PointPos.Start)
CAD.getSketch('sketch001').addConstraint(type=ConstraintType.Vertical, geo_1='line4')
CAD.getSketch('sketch002').addLine(start = CAD.Point(3, -13.5+%DIST%), end = CAD.Point(5, -13.5+%DIST%), construction = False)
CAD.getSketch('sketch002').addConstraint(type=ConstraintType.Coincident, geo_1='line1', pos_1=PointPos.Start, geo_2='vertex4', pos_2=PointPos.Start)
CAD.getSketch('sketch002').addConstraint(type=ConstraintType.Coincident, geo_1='line1', pos_1=PointPos.End, geo_2='vertex3', pos_2=PointPos.Start)
CAD.getSketch('sketch002').addLine(start = CAD.Point(5, -13.5+%DIST%), end = CAD.Point(14.5, -4+%DIST%), construction = False)
CAD.getSketch('sketch002').addConstraint(type=ConstraintType.Coincident, geo_1='line2', pos_1=PointPos.Start, geo_2='vertex3', pos_2=PointPos.Start)
CAD.getSketch('sketch002').addConstraint(type=ConstraintType.Coincident, geo_1='line2', pos_1=PointPos.End, geo_2='vertex2', pos_2=PointPos.Start)
CAD.getSketch('sketch002').addLine(start = CAD.Point(14.5, -4+%DIST%), end = CAD.Point(14.5, 46.5+%DIST%), construction = False)
CAD.getSketch('sketch002').addConstraint(type=ConstraintType.Coincident, geo_1='line3', pos_1=PointPos.Start, geo_2='vertex2', pos_2=PointPos.Start)
CAD.getSketch('sketch002').addConstraint(type=ConstraintType.Coincident, geo_1='line3', pos_1=PointPos.End, geo_2='vertex1', pos_2=PointPos.Start)
CAD.getSketch('sketch002').addConstraint(type=ConstraintType.Vertical, geo_1='line3')
CAD.getSketch('sketch002').addLine(start = CAD.Point(14.5, 46.5+%DIST%), end = CAD.Point(8, 46.5+%DIST%), construction = False)
CAD.getSketch('sketch002').addConstraint(type=ConstraintType.Coincident, geo_1='line4', pos_1=PointPos.Start, geo_2='vertex1', pos_2=PointPos.Start)
CAD.getSketch('sketch002').addConstraint(type=ConstraintType.Coincident, geo_1='line4', pos_1=PointPos.End, geo_2='vertex7', pos_2=PointPos.Start)
CAD.getSketch('sketch002').addConstraint(type=ConstraintType.Horizontal, geo_1='line4')
CAD.getSketch('sketch002').addLine(start = CAD.Point(8, 46.5+%DIST%), end = CAD.Point(8, 31.5+%DIST%,), construction = False)
CAD.getSketch('sketch002').addConstraint(type=ConstraintType.Coincident, geo_1='line5', pos_1=PointPos.Start, geo_2='vertex7', pos_2=PointPos.Start)
CAD.getSketch('sketch002').addConstraint(type=ConstraintType.Coincident, geo_1='line5', pos_1=PointPos.End, geo_2='vertex6', pos_2=PointPos.Start)
CAD.getSketch('sketch002').addConstraint(type=ConstraintType.Vertical, geo_1='line5')
CAD.getSketch('sketch002').addLine(start = CAD.Point(8, 31.5+%DIST%), end = CAD.Point(3, 26+%DIST%), construction = False)
CAD.getSketch('sketch002').addConstraint(type=ConstraintType.Coincident, geo_1='line6', pos_1=PointPos.Start, geo_2='vertex6', pos_2=PointPos.Start)
CAD.getSketch('sketch002').addConstraint(type=ConstraintType.Coincident, geo_1='line6', pos_1=PointPos.End, geo_2='vertex5', pos_2=PointPos.Start)
CAD.getSketch('sketch002').addLine(start = CAD.Point(3, 26+%DIST%), end = CAD.Point(3, -13.5+%DIST%), construction = False)
CAD.getSketch('sketch002').addConstraint(type=ConstraintType.Coincident, geo_1='line7', pos_1=PointPos.Start, geo_2='vertex5', pos_2=PointPos.Start)
CAD.getSketch('sketch002').addConstraint(type=ConstraintType.Coincident, geo_1='line7', pos_1=PointPos.End, geo_2='vertex4', pos_2=PointPos.Start)
CAD.getSketch('sketch002').addConstraint(type=ConstraintType.Vertical, geo_1='line7')
CAD.recompute()
Model.updateSolverList()
Model.updateSolverList()
Window.setView('fitView')
CAD.getSketch('sketch003').addLine(start = CAD.Point(0, -20.5), end = CAD.Point(3, -20.5), construction = False)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Coincident, geo_1='line1', pos_1=PointPos.Start, geo_2='vertex6', pos_2=PointPos.Start)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Coincident, geo_1='line1', pos_1=PointPos.End, geo_2='vertex11', pos_2=PointPos.Start)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Horizontal, geo_1='line1')
CAD.getSketch('sketch003').addLine(start = CAD.Point(3, -20.5), end = CAD.Point(5, -20.5), construction = False)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Coincident, geo_1='line2', pos_1=PointPos.Start, geo_2='vertex11', pos_2=PointPos.Start)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Coincident, geo_1='line2', pos_1=PointPos.End, geo_2='vertex10', pos_2=PointPos.Start)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Horizontal, geo_1='line2')
CAD.getSketch('sketch003').addLine(start = CAD.Point(5, -20.5), end = CAD.Point(14.5, -11), construction = False)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Coincident, geo_1='line3', pos_1=PointPos.Start, geo_2='vertex10', pos_2=PointPos.Start)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Coincident, geo_1='line3', pos_1=PointPos.End, geo_2='vertex9', pos_2=PointPos.Start)
CAD.getSketch('sketch003').addLine(start = CAD.Point(14.5, -11), end = CAD.Point(14.5, -4+%DIST%), construction = False)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Coincident, geo_1='line4', pos_1=PointPos.Start, geo_2='vertex9', pos_2=PointPos.Start)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Coincident, geo_1='line4', pos_1=PointPos.End, geo_2='vertex8', pos_2=PointPos.Start)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Vertical, geo_1='line4')
CAD.getSketch('sketch003').addLine(start = CAD.Point(14.5, -4+%DIST%), end = CAD.Point(14.5, 46.5+%DIST%), construction = False)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Coincident, geo_1='line5', pos_1=PointPos.Start, geo_2='vertex8', pos_2=PointPos.Start)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Coincident, geo_1='line5', pos_1=PointPos.End, geo_2='vertex7', pos_2=PointPos.Start)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Vertical, geo_1='line5')
CAD.getSketch('sketch003').addLine(start = CAD.Point(14.5, 46.5+%DIST%), end = CAD.Point(8, 46.5+%DIST%), construction = False)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Coincident, geo_1='line6', pos_1=PointPos.Start, geo_2='vertex7', pos_2=PointPos.Start)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Coincident, geo_1='line6', pos_1=PointPos.End, geo_2='vertex4', pos_2=PointPos.Start)
CAD.getSketch('sketch003').addLine(start = CAD.Point(8, 46.5+%DIST%), end = CAD.Point(0, 46.5+%DIST%), construction = False)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Coincident, geo_1='line7', pos_1=PointPos.Start, geo_2='vertex4', pos_2=PointPos.Start)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Coincident, geo_1='line7', pos_1=PointPos.End, geo_2='vertex5', pos_2=PointPos.Start)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Horizontal, geo_1='line7')
CAD.getSketch('sketch003').addLine(start = CAD.Point(0, 46.5+%DIST%), end = CAD.Point(0, -20.5), construction = False)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Coincident, geo_1='line8', pos_1=PointPos.Start, geo_2='vertex5', pos_2=PointPos.Start)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Coincident, geo_1='line8', pos_1=PointPos.End, geo_2='vertex6', pos_2=PointPos.Start)
CAD.getSketch('sketch003').addConstraint(type=ConstraintType.Vertical, geo_1='line8')
CAD.recompute()
Face=CAD.addCreateFacebySketch('Face')
Face.sketch = 'sketch'
CAD.getObject('sketch').setHide(True)
Window.setView('fitView')
Face=CAD.addCreateFacebySketch('Face001')
Face.sketch = 'sketch001'
CAD.getObject('sketch001').setHide(True)
Window.setView('fitView')
Face=CAD.addCreateFacebySketch('Face002')
Face.sketch = 'sketch003'
CAD.getObject('sketch003').setHide(True)
Window.setView('fitView')
Face=CAD.addCreateFacebySketch('Face003')
Face.sketch = 'sketch002'
CAD.getObject('sketch002').setHide(True)
Window.setView('fitView')
sketch = CAD.addSketch('sketch004')
sketch.setRotation(0, 0, 0, 1)
CAD.getSketch('sketch004').addCircleArc(center = CAD.Point(0, 0), range = CAD.Point(-1.57779,1.57417), radius = 134.843)
CAD.getSketch('sketch004').addConstraint(type=ConstraintType.Coincident, geo_1='arc1', pos_1=PointPos.Mid, geo_2='axis_x', pos_2=PointPos.Start)
CAD.getSketch('sketch004').addConstraint(type=ConstraintType.PointOnObject, geo_1='arc1', pos_1=PointPos.End, geo_2='axis_y')
CAD.getSketch('sketch004').addConstraint(type=ConstraintType.PointOnObject, geo_1='arc1', pos_1=PointPos.Start, geo_2='axis_y')
CAD.getSketch('sketch004').addPoint(CAD.Point(4.29697e-11, -134.84))
CAD.getSketch('sketch004').addConstraint(type=ConstraintType.Coincident, geo_1='vertex1', pos_1=PointPos.Start, geo_2='arc1', pos_2=PointPos.Start)
CAD.getSketch('sketch004').addPoint(CAD.Point(4.12828e-14, 134.84))
CAD.getSketch('sketch004').addConstraint(type=ConstraintType.Coincident, geo_1='vertex2', pos_1=PointPos.Start, geo_2='arc1', pos_2=PointPos.End)
CAD.getSketch('sketch004').addLine(start = CAD.Point(4.12828e-14, 134.84), end = CAD.Point(-2.47697e-14, -134.84), construction = False)
CAD.getSketch('sketch004').addConstraint(type=ConstraintType.Coincident, geo_1='line1', pos_1=PointPos.Start, geo_2='arc1', pos_2=PointPos.End)
CAD.getSketch('sketch004').addConstraint(type=ConstraintType.Coincident, geo_1='line1', pos_1=PointPos.End, geo_2='arc1', pos_2=PointPos.Start)
CAD.getSketch('sketch004').addConstraint(type=ConstraintType.Vertical, geo_1='line1')
CAD.recompute()
Face=CAD.addCreateFacebySketch('Face004')
Face.sketch = 'sketch004'
CAD.getObject('sketch004').setHide(True)
Window.setView('fitView')
Model.updateSolverList()
Model.updateSolverList()
geomList = [['Face004', ['Face1']]]
Mesh.createPartsComponent(comp_name = 'air', geomNamelist = geomList)
geomList = [['Face003', []]]
Mesh.createPartsComponent(comp_name = 'mov', geomNamelist = geomList)
geomList = [['Face002', []]]
Mesh.createPartsComponent(comp_name = 'band', geomNamelist = geomList)
geomList = [['Face001', []]]
Mesh.createPartsComponent(comp_name = 'coil', geomNamelist = geomList)
geomList = [['Face', []]]
Mesh.createPartsComponent(comp_name = 'fix', geomNamelist = geomList)


gl.Table('dt4e')
table = gl.tables['dt4e']
table.interpolationType = InterpolationType.Linear
table.extrapolationType = ExtrapolationType.BHType2
table.argument = 'H'
table.outPutName = 'B'
table.setData( ( 0, 238.7, 318.3, 358.1, 437.7, 477.5, 636.6, 795.8, 1114.1, 1273.2, 1591.5, 2228.2, 3183.1, 4774.6, 6366.2, 7957.7, 15915.5, 31831, 47746.5, 63662, 79577.5, 159155, 318310, ), ( 0, 0.2003, 0.3204, 0.40045, 0.50055, 0.5606, 0.7908, 0.931, 1.1014, 1.2016, 1.302, 1.4028, 1.524, 1.626, 1.698, 1.73, 1.87, 1.99, 2.04, 2.07, 2.095, 2.2, 2.4, ) )
gl.loadMaterial('air')
gl.materials['air'].removeValue(MaterialProperty.AdvancedDensityType)
gl.materials['air'].removeValue(MaterialProperty.BoussinesqDensity)
gl.materials['air'].removeValue(MaterialProperty.ThermalExpansionCoefficient)
gl.materials['air'].removeValue(MaterialProperty.MolecularWeight)
gl.materials['air'].addType(MaterialType.Thermal)
gl.materials['air'].setValue(MaterialProperty.KZZ, ValueType.Value,  26.24)
gl.materials['air'].setValue(MaterialProperty.KYY, ValueType.Value,  26.24)
gl.materials['air'].setValue(MaterialProperty.KXX, ValueType.Value,  26.24)
gl.materials['air'].setValue(MaterialProperty.HCAPACITY, ValueType.Value,  1012000000)
gl.materials['air'].removeType(MaterialType.IronLoss)
gl.Material('dt4e')
gl.materials['dt4e'].addType(MaterialType.Magnetic_MUR)
gl.materials['dt4e'].setValue(MaterialProperty.MURX, ValueType.Table,  1)
gl.materials['dt4e'].setValue(MaterialProperty.MURY, ValueType.Table,  1)
gl.materials['dt4e'].setValue(MaterialProperty.MURZ, ValueType.Table,  1)
gl.materials['dt4e'].setValue(MaterialProperty.Density, ValueType.Value,  2e-07)
gl.materials['dt4e'].removeType(MaterialType.IronLoss)
gl.materials['dt4e'].value(MaterialProperty.Density).value = 2e-07
gl.materials['dt4e'].addType(MaterialType.Thermal)
gl.materials['dt4e'].setValue(MaterialProperty.KZZ, ValueType.Value,  20000)
gl.materials['dt4e'].setValue(MaterialProperty.KYY, ValueType.Value,  20000)
gl.materials['dt4e'].setValue(MaterialProperty.KXX, ValueType.Value,  20000)
gl.materials['dt4e'].setValue(MaterialProperty.HCAPACITY, ValueType.Value,  460000000)
gl.materials['dt4e'].setValue(MaterialProperty.Density, ValueType.Value,  7.5e-06)
gl.Material('coil')
gl.materials['coil'].addType(MaterialType.Thermal)
gl.materials['coil'].setValue(MaterialProperty.KZZ, ValueType.Value,  380000)
gl.materials['coil'].setValue(MaterialProperty.KYY, ValueType.Value,  380000)
gl.materials['coil'].setValue(MaterialProperty.KXX, ValueType.Value,  380000)
gl.materials['coil'].setValue(MaterialProperty.HCAPACITY, ValueType.Value,  380000000)
gl.materials['coil'].addType(MaterialType.Electro_RSV)
gl.materials['coil'].setValue(MaterialProperty.RSVZ, ValueType.Value,  0.00019025)
gl.materials['coil'].setValue(MaterialProperty.RSVY, ValueType.Value,  0.00019025)
gl.materials['coil'].setValue(MaterialProperty.RSVX, ValueType.Value,  0.00019025)
gl.materials['coil'].addType(MaterialType.Magnetic_MUR)
gl.materials['coil'].setValue(MaterialProperty.MURX, ValueType.Value,  1)
gl.materials['coil'].setValue(MaterialProperty.MURY, ValueType.Value,  1)
gl.materials['coil'].setValue(MaterialProperty.MURZ, ValueType.Value,  1)
gl.materials['coil'].setValue(MaterialProperty.Density, ValueType.Value,  8.95e-06)
Model.updateSolverList()
Model.updateSolverList()
gl.materials['air'].removeValue(MaterialProperty.AdvancedDensityType)
gl.materials['air'].removeValue(MaterialProperty.BoussinesqDensity)
gl.materials['air'].removeValue(MaterialProperty.ThermalExpansionCoefficient)
gl.materials['air'].addType(MaterialType.Thermal)
gl.materials['air'].setValue(MaterialProperty.KZZ, ValueType.Value,  26.24)
gl.materials['air'].setValue(MaterialProperty.KYY, ValueType.Value,  26.24)
gl.materials['air'].setValue(MaterialProperty.KXX, ValueType.Value,  26.24)
gl.materials['air'].setValue(MaterialProperty.HCAPACITY, ValueType.Value,  1012000000)
gl.materials['air'].addType(MaterialType.Magnetic_MUR)
gl.materials['air'].setValue(MaterialProperty.MURX, ValueType.Value,  1)
gl.materials['air'].setValue(MaterialProperty.MURY, ValueType.Value,  1)
gl.materials['air'].setValue(MaterialProperty.MURZ, ValueType.Value,  1)
gl.materials['air'].removeType(MaterialType.IronLoss)
gl.materials['air'].removeValue(MaterialProperty.MolecularWeight)

Model.Model('model_1')
Model.models['model_1'].typeName = 'Electromagnetic (LF)'
Model.models['model_1'].solution.setValue(SolutionType.GaugeMethod, 3)

geomList = [['Face001', ['Face1']]]
Mesh.createPartsComponent(comp_name = 'slave', geomNamelist = geomList)
geomList = [['Face001', ['Vertex4']]]
Mesh.createPartsComponent(comp_name = 'master', geomNamelist = geomList)

Model.models['model_1'].importComponent('air')
Model.models['model_1'].importComponent('mov')
Model.models['model_1'].importComponent('band')
Model.models['model_1'].importComponent('coil')
Model.models['model_1'].importComponent('fix')
Model.models['model_1'].importComponent('slave')
Model.models['model_1'].importComponent('master')

component = Model.models['model_1'].componentList.at(0)
component.elementType = 'MAGNETIC_Tri3'
component.elementAttribute = 'Axisymmetric'
component.thickness = 1
component.emagForceOutput = 1
component.emagForceCalculation = 2
Mesh.setComponentToElemType('air')
component = Model.models['model_1'].componentList.at(1)
component.elementType = 'MAGNETIC_Tri3'
component.elementAttribute = 'Axisymmetric'
component.thickness = 1
component.emagForceOutput = 1
component.emagForceCalculation = 2
Mesh.setComponentToElemType('mov')
component = Model.models['model_1'].componentList.at(2)
component.elementType = 'MAGNETIC_Tri3'
component.elementAttribute = 'Axisymmetric'
component.thickness = 1
component.emagForceOutput = 1
component.emagForceCalculation = 2
Mesh.setComponentToElemType('band')
component = Model.models['model_1'].componentList.at(3)
component.elementType = 'MAGNETIC_Tri3'
component.elementAttribute = 'Axisymmetric'
component.thickness = 1
component.emagForceOutput = 1
component.emagForceCalculation = 2
Mesh.setComponentToElemType('coil')
component = Model.models['model_1'].componentList.at(4)
component.elementType = 'MAGNETIC_Tri3'
component.elementAttribute = 'Axisymmetric'
component.thickness = 1
component.emagForceOutput = 1
component.emagForceCalculation = 2
Mesh.setComponentToElemType('fix')
Model.models['model_1'].componentList.at(0).materialId = 2
Model.models['model_1'].componentList.at(3).materialId = 2
Model.models['model_1'].componentList.at(2).materialId = 2
Model.models['model_1'].componentList.at(3).materialId = 4
Model.models['model_1'].componentList.at(4).materialId = 3
Model.models['model_1'].componentList.at(1).materialId = 3
bc = Model.BoundaryCondition()
bc.type = 'SourceCurrentDensity'
bc.compId = 4
bc.value('JSX').value = 0
bc.value('JSX').type = ValueType.Value
bc.value('JSY').value = 0
bc.value('JSY').type = ValueType.Value
bc.value('JSZ').value = 1600
bc.value('JSZ').type = ValueType.Value
Model.models['model_1'].bcList.append(bc)

Mesh.setLocalSeed(part = 'Face003', sub_list = ['Edge1', 'Edge2', 'Edge3', 'Edge4', 'Edge5', 'Edge6', 'Edge7'], size = 1)
Mesh.setLocalSeed(part = 'Face', sub_list = ['Edge1', 'Edge2', 'Edge3', 'Edge4', 'Edge5', 'Edge6', 'Edge7', 'Edge8', 'Edge9', 'Edge10', 'Edge11'], size = 1)
Mesh.setLocalSeed(part = 'Face001', sub_list = ['Edge1', 'Edge2', 'Edge3', 'Edge4'], size = 1)
Mesh.setLocalSeed(part = 'Face002', sub_list = ['Edge1', 'Edge2', 'Edge3', 'Edge4', 'Edge5', 'Edge6', 'Edge7', 'Edge8'], size = 1)
Mesh.setLocalSeed(part = 'Face004', sub_list = ['Edge2'], size = 1)
Mesh.createSharedTopoMesh(listFullName = ['Face003.Face1', 'Face.Face1', 'Face001.Face1', 'Face002.Face1', 'Face004.Face1'], sharedTopoMeshType = 2, elemType = 'ETri', order = 1, tolerance = 0.000000000)

para = Model.OutputPara()
para.name = 'parameter_1'
para.timeType = 'Latest'
para.locationType = 'Integration'
para.idType = 'comp'
para.variable = 'EMAGFY'
para.locationId = 2
para.endTime = 1
para.startTime = 0
Model.models['model_1'].outputParaList.append(para)




